/**
 * @file sync_transceiver.h
 * @author 王烨
 * @date 2011-01-10
**/

#ifndef SYNC_TRANSCEIVER_H_INCLUDED
#define SYNC_TRANSCEIVER_H_INCLUDED

#include <string>

namespace skeleton
{
  /*同步收发器，只会在客户端使用*/
  class SyncTransceiver
  {
  public:
    /*连接TCP端口*/
    void Connect(const std::string &host, unsinged short port);
    virtual void Connect(const char *host, unsinged short port) = 0;
    /*连接域socket*/
    void Connect(const std::string &path);
    virtual void Connect(const char *path) = 0;
    /*是否已连接*/
    virtual bool IsConnected() = 0;
    /*关闭连接*/
    virtual void Close() = 0;
  };
}
#endif
